import urllib.request


Cookie='ASP.NET_SessionId=nmctfumf25szky45xikrzp55'
User='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36'

url= 'http://218.86.103.26:81/xs_main.aspx?xh=2016041636'
req = urllib.request.Request(url)
req.add_header('User-Agent',User)
req.add_header('Cookie',Cookie)
response = urllib.request.urlopen(req)
html = response.read().decode('gb2312')
with open('test.txt','w')as f:
    f.write(html)
